/**
 * @param {Array} list 获取当前时间
 * @returns {Array}
 */
 export const getTime = arr => {
    var date = new Date();
    var year = date.getFullYear();
    var month = date.getMonth() + 1;
    month = month < 10 ? "0" + month : month;
    var day = date.getDate();
    day = day < 10 ? "0" + day : day;
    var hour = date.getHours();
    hour = hour < 10 ? "0" + hour : hour;
    var minute = date.getMinutes();
    var second = date.getSeconds();
    minute = minute < 10 ? "0" + minute : minute;
    second = second < 10 ? "0" + second : second;
    if (arr == "年月日") return year + "年" + month + "月" + day + "日 ";
    else if (arr == "yyyy-mm-dd hh24:mi:ss") {
      return (
        year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second
      );
    } else if (arr == "yyyy-mm-dd") {
      return year + "-" + month + "-" + day;
    } else
      return (
        year +
        "年" +
        month +
        "月" +
        day +
        "日 " +
        hour +
        ":" +
        minute +
        ":" +
        second
      );
  
  };